package org.ksug.samples.springmvc;

import java.beans.PropertyEditorSupport;

public class CountryEditor extends PropertyEditorSupport {

	@Override
	public void setAsText(String text) throws IllegalArgumentException {

		for (Country country: Country.values()) {
			if(country.toString().equals(text))
				this.setValue(country);
		}
		
	}
}
